package com.zhanglinwei.openApiClient.wrapper;

import com.zhanglinwei.openApiClient.model.entity.OpenApiEntity;

import java.util.Map;
import java.util.concurrent.atomic.AtomicInteger;

public class OpenApiLambdaWrapper<T extends OpenApiEntity<?>> extends AbstractLambdaWrapper<T, OpenApiLambdaWrapper<T>> {

    public OpenApiLambdaWrapper(){
    }
    public OpenApiLambdaWrapper(Class<T> entityClass) {
        setEntityClass(entityClass);
    }

    private OpenApiLambdaWrapper(Class<T> entityClass, AtomicInteger paramKeySequence, Map<String, Object> parameterMap) {
        super.setEntityClass(entityClass);
        this.paramKeySequence = paramKeySequence;
        this.parameterMap = parameterMap;
    }
    @Override
    protected OpenApiLambdaWrapper<T> newInstance() {
        return new OpenApiLambdaWrapper<>(getEntityClass(), getParamKeySequence(), getParameterMap());
    }

}
